import request from '@/utils/request'
export function list(params) {
  return request({
    url: '/admin/groupBuy/list',
    method: 'get',
    params: params
  })
}

export function groupList(params) {
  return request({
    url: '/groupBuy/list',
    method: 'get',
    params: params
  })
}

export function orderList(params) {
  return request({
    url: '/admin/groupPeriod/list',
    method: 'get',
    params: params
  })
}

export function getOrderList(params) {
  return request({
    url: '/admin/groupPeriod/getOrderList',
    method: 'get',
    params: params
  })
}

export function save(data) {
  return request({
    url: '/admin/groupBuy/save',
    method: 'post',
    data: data
  })
}


export function del(ids) {
  return request({
    url: '/admin/groupBuy/del/' + ids,
    method: 'post'
  })
}

export function update(data) {
  return request({
    url: '/admin/groupBuy/update',
    method: 'post',
    data: data
  })
}

export function audit(data) {
  return request({
    url: '/admin/groupBuy/audit',
    method: 'post',
    data: data
  })
}

export function unAudit(data) {
  return request({
    url: '/admin/groupBuy/unAudit',
    method: 'post',
    data: data
  })
}

export function find(id) {
  return request({
    url: '/admin/groupBuy/find/' + id,
    method: 'get'
  })
}

export function cancel(params) {
  return request({
    url: '/admin/groupBuy/cancel',
    method: 'post',
    params: params
  })
}


export function productAdd(params) {
  return request({
    url: '/admin/groupBuy/productAdd',
    method: 'get',
    params: params
  })
}
export function productDel(params) {
  return request({
    url: '/admin/groupBuy/productDel',
    method: 'get',
    params: params
  })
}
export function productList(params) {
  return request({
    url: '/admin/groupBuy/productList',
    method: 'get',
    params: params
  })
}








